#pragma once

#include"RBTree.h"

template<class K>
class set
{
	struct KeyofK
	{
		const K& operator()(const K& key)
		{
			return key;
		}
	};

	typedef RBTree<K, const K, KeyofK> RBTree;
public:
	typedef typename RBTree::Iterator iterator;
	typedef typename RBTree::ConstIterator const_iterator;

	iterator begin()
	{
		return _t.begin();
	}

	iterator end()
	{
		return _t.end();
	}

	const_iterator end() const
	{
		return _t.end();
	}

	const_iterator begin() const
	{
		return _t.begin();
	}

	pair<iterator, bool> insert(const K& data)
	{
		return _t.Insert(data);
	}

	iterator find(const K& data)
	{
		return _t.Find(data);
	}

private:
	RBTree _t;
};